package test_public;

import static org.junit.Assert.*;
import org.junit.BeforeClass;
import org.junit.Test;

import datamodel.rucksack.RucksackObject;

/**
 * Public test class for the RucksackObject class
 * @author Peter
 *
 */
public class RucksackObjectTest {
	
	
	static RucksackObject o1;
	static RucksackObject o2;
	static RucksackObject o3;

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		o1 = new RucksackObject(0, 2);
		o2 = new RucksackObject(0, 2);
		o3 = o1;
	}

	@Test
	public void testGetValue() {
		assertEquals(0, o1.getValue());
		assertEquals(0, o3.getValue());
	}

	@Test
	public void testGetWeight() {
		assertEquals(2, o1.getWeight());
		assertEquals(2, o3.getWeight());
	}

	@Test
	public void testEqualsObject() {
		assertEquals(false, o1.equals(o2));
		assertEquals(true, o3.equals(o1));
		assertEquals(false, o2.equals(o3));
	}

}
